import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/layout/index.vue'
import Layout1 from '@/layout1/index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    component: Layout,
    redirect: "/",
    children: [
      {
        path: "/",
        component: () => import("@/views/inspectionOrder/index"),
      },
      {
        path: "/historicalData",
        component: () => import("@/views/historicalData/index"),
      },
      {
        path: "/customsDeclarationInspectionInfo",
        component: () => import("@/views/customsDeclarationInspectionInfo/index"),
      },

      
    ],
  },

  {
    path: "/404",
    name: "Error",
    component: () => import("../views/error/404.vue"),
  },
  {
    path:'/test',
    name:'test',
    component:()=>import('../views/error/test.vue')
  }
];

const router = new VueRouter({
  mode: "hash",
  routes,

});
router.beforeEach((to, from, next) => {

  next()
})
router.afterEach(() => {
  document.body.scrollTop = 0;
  document.documentElement.scrollTop = 0;
});
export default router
